package org.example;

import lombok.Data;
import org.example.configuration.RedisConfig;
import org.redisson.Redisson;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(RedisConfig.class);
        RedisTemplate<String, Tes> redisTemplate = context.getBean(RedisTemplate.class);

        Tes tes = new Tes();
        tes.setKey("sdjfdjsalfjdsajlfsdlfjdsfldsl的房东发 ");


       Tes o = redisTemplate.opsForValue().get("key");


    }

    @Data
     static class Tes{
        private String key;
    }
}
